<xsl:stylesheet version='2.0'
	xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
	<xsl:template match="/">
		<tr>
			<xsl:for-each select="//BBB">
				<xsl:call-template name="print" />
			</xsl:for-each>
		</tr>
	</xsl:template>
	<xsl:template name="print">
		<td>
			<xsl:for-each select="./*">
				<div>
					<xsl:value-of select="name()" />
					<xsl:text>id=</xsl:text>
					<xsl:value-of select="@id" />
				</div>
			</xsl:for-each>
		</td>
	</xsl:template>
</xsl:stylesheet>